﻿namespace CommLib
{
    public class MessageSms :BluetoothMessage
    {
        public MessageSms(Sms sms)
		    : base(BtMessageType.SMS, new string[] { sms.getText(),
				    BluetoothMessage.encodeDateTime(sms.getDate()).ToString(),
				    ((int)sms.getType()).ToString(),
				    sms.getThreadId().ToString(), sms.getNumber(),
				    ((int)sms.getStatus()).ToString() })
        {
	    }

	    public MessageSms(byte[] data, int length)
		    : base(BtMessageType.SMS, data, length)
        {
	    }

	    public Sms getSms() {
		    return new Sms(mData, 0);
	    }
    }
}
